#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

typedef struct box {
	float x;
	float y;
	float w;
	float h;
	int class_index;
	float p;
}box;

typedef struct Rect {
	float x1;
	float y1;
	float x2;
	float y2;
	int class_index;
	float p;
}Rect;

float iou(box box1, box box2);
float min_float(float a, float b);
float max_float(float a, float b);


//static void argsort(int n, const box* x, int class_loop, int* indices);


Rect* interpret_output(float* output,
	int cell_H, int cell_W,
	int image_height, int image_width, int original_height, int original_width, int h_step, int w_step,
	int num_class, int boxes_per_cell,
        float threshold, float iou_threshold,
	int* numBoxesOut);
